<template>
  <div class="">
    我是子组件
    <p>count is {{ count }}</p>
  </div>
</template>

<script setup>
import { ref } from 'vue'
const count = ref(0)
const add = () => {
  count.value++
}

defineExpose({
  // 要暴露给父组件的内容，通过对象返回
  //   count,
  add
})
</script>

<style scoped></style>
